import Vue from 'vue';
// 使用方法
// get:this.$api.get(参数).then(res=>{})
// post:this.$api.post(参数).then(res=>{})
const install = (Vue, vm) => {
	Vue.prototype.$api = vm.$u.api = {
		login: (params = {}) => vm.$u.post('/seller/login', params), //供应商登录
		getVerify: (params = {}) => vm.$u.get('/sms/mobile', params), //获取手机验证码
		codeLogin: (params = {}) => vm.$u.post('/seller/code', params), //验证码登录
		getOrderList: (params = {}) => vm.$u.get('/buyerOrderList/sellerPage', params), //订单列表
		getOrderById: (params = {}) => vm.$u.get('/buyerOrderList/getSellerOrderById', params), //订单详情
		getOrderApproval: (params = {}) => vm.$u.post('/buyerOrderList/approval/seller', params), //订单审批
		getAllHarborInfo: (params = {}) => vm.$u.get('/ShopHarborInfo/getAllHarborInfo', params), //获取港口
		getMarginForBorrowing: (params = {}) => vm.$u.get('/sellerBill/pageSeller', params), //获取借款保证金列表
		getExportDeposit: (params = {}) => vm.$u.get('/sellerBill/pageExitSeller', params), //获取出口保证金列表
		setUploadDeposit: (params = {}) => vm.$u.post('/sellerBill/uploadDeposit', params), //上传借款保证金凭证
		setUploadOutDeposit: (params = {}) => vm.$u.post('/sellerBill/uploadOutDeposit', params), //上传出口保证金凭证
		getOrderBillList: (params = {}) => vm.$u.get('/sellerBill/sellerPage', params), //账单订单费用
		getCarBillList: (params = {}) => vm.$u.get('/SellerBillExtend/pageSeller', params), //账单车费用
		getSellerAmount: (params = {}) => vm.$u.get('/sellerAmount/sellerAmount', params), //获取用户余额
		getCheckPay: (params = {}) => vm.$u.post('/sellerInfo/checkPay', params), //判断支付密码
		setPaymentOrder: (params = {}) => vm.$u.post('/sellerBill/balance', params), //订单费用
		setPaymentCar: (params = {}) => vm.$u.post('/SellerBillExtend/balance', params), //车费用
		getBillOrderDetail: (params = {}) => vm.$u.get('/sellerBill/getDetail', params), //订单费用详情
		getBillCarDetail: (params = {}) => vm.$u.get('/SellerBillExtend/getById', params), //车费用详情
		getPageSellerList: (params = {}) => vm.$u.get('/sellerTaxRefundList/pageSeller', params), //退税列表
		getSellerBankList: (params = {}) => vm.$u.get('/sellerBankList/list', params), //全部银行
		setSettlementBank: (params = {}) => vm.$u.post('/sellerTaxRefundList/selectSettlementBank',
			params), //退税结算
		getTaxRefundById: (params = {}) => vm.$u.get('/sellerTaxRefundList/getById', params), //退税详情
		getSettlementList: (params = {}) => vm.$u.get('/sellerSettle/sellerPage', params), //结算列表
		setSettlementCar: (params = {}) => vm.$u.post('/sellerSettle/settle', params), //车款结算提交结算
		getSettlementRecord: (params = {}) => vm.$u.get('/sellerSettle/sellerDetailPage', params), //结算记录
		getSettlementDetails: (params = {}) => vm.$u.get('/sellerSettle/detail', params), //结算明细
		getLoanList: (params = {}) => vm.$u.get('/sellerLoan/pageSeller', params), //贷款列表
		setBatchRepayment: (params = {}) => vm.$u.post('/sellerLoan/batchRepayment', params), //贷款还款
		getPickupPage: (params = {}) => vm.$u.get('/buyerPickupApply/sellerPickupPage', params), //提车申请
		setConfirmPickup: (params = {}) => vm.$u.get('/buyerPickupApply/confirm/seller', params), //确认提车
		getPickupById: (params = {}) => vm.$u.get('/buyerPickupApply/getById', params), //提车详情
		getDeliveryList: (params = {}) => vm.$u.get('/sellerDeliveryList/sellerPage', params), //发货列表
		getDeliveryOrder: (params = {}) => vm.$u.get('/buyerOrderList/getListBySeller', params), //获取发货订单
		getDeliveryCars: (params = {}) => vm.$u.get('/sellerDeliveryList/deliveryCarList', params), //获取发货车辆
		getDeliveryApply: (params = {}) => vm.$u.post('/sellerDeliveryList/apply', params), //发货申请
		getDeliveryReapply: (params = {}) => vm.$u.post('/sellerDeliveryList/reapply', params), //发货重申请		
		getDeliveryCars: (params = {}) => vm.$u.get('/sellerDeliveryList/deliveryCarList', params), //获取发货车辆
		getDeliveryById: (params = {}) => vm.$u.get('/sellerDeliveryList/getById', params), //获取发货详情
		getCheckCode: (params = {}) => vm.$u.get('/sms/checkCode', params), //校验验证码
		getHomeArrears: (params = {}) => vm.$u.post('/sellerLoan/getHomeArrears', params), //首页统计

		// -----------------------分割----------------------------------------------------------
		// 模板
		getInfo: (params = {}) => vm.$u.get('/seller/detail', params), //获取经销商信息
		getBankList: (params = {}) => vm.$u.get('/bank/getBankList', params), //获取全部银行
		register: (params = {}) => vm.$u.post('/sellerReg/register/mobile', params), //注册
		getCreditTemplate: (params = {}) => vm.$u.get('/sellerCreditAmountApply/getTemplate', params), //获取授信模板
		getCreditDetails: (params = {}) => vm.$u.get('/sellerCreditAmountApply/getDetails', params), //获取授信详情
		applyCredit: (params = {}) => vm.$u.post('/sellerCreditAmountApply/applyCredit', params), //申请授信
		reapplyCredit: (params = {}) => vm.$u.post('/sellerCreditAmountApply/userReplenish', params), //重新申请授信
		getCompanyInfo: (params = {}) => vm.$u.get('/businessLicense/getBusinesssInfoByKeyword',
			params), //根据企业名称查询企业信息
		attestation: (params = {}) => vm.$u.post('/sellerInfo/certification', params), //企业认证
		getSalesApplyList: (params = {}) => vm.$u.get('/sellerCarInApply/supplierPage', params), //销售申请分页
		getSalesBankList: (params = {}) => vm.$u.get('/sellerCreditAmountApply/credit/amount',
			params), // 销售申请获取银行列表
		getCarList: (params = {}) => vm.$u.get('/CarInfo/car', params), //获取系统车辆信息
		getMemberInfo: (params = {}) => vm.$u.get('/sellerAmount/sellerAmount', params), //获取会员信息
		getConsumptionLog: (params = {}) => vm.$u.get('/sellerAmount/sellerAmount', params), //获取消费记录
		applyList: (params = {}) => vm.$u.get('/sellerCreditAmountApply/applyList', params), //获取授信记录
		getSalesWarehouseList: (params = {}) => vm.$u.get('/StoreInfo/list', params), //获取销售申请仓库列表
		addSalesApply: (params = {}) => vm.$u.post('/sellerCarInApply/apply', params), //新增销售申请
		getSalesDetails: (params = {}) => vm.$u.get('/sellerCarInApply/getById', params), //获取销售申请详情
		contractUpload: (params = {}) => vm.$u.post('/sellerContract/formal/upload', params), //供应商上传合同
		getExportApplyList: (params = {}) => vm.$u.get('/sellerCarOutApply/sellerPage', params), //供应商上传合同
		searchSellerCarList: (params = {}) => vm.$u.get('/carList/searchSellerCarList', params), //查询供应商在库车辆
		addExportApply: (params = {}) => vm.$u.post('/sellerCarOutApply/apply', params), //新增出口申请
		getExportDetails: (params = {}) => vm.$u.get('/sellerCarOutApply/getById', params), //获取出口申请详情
		getExportCarDetails: (params = {}) => vm.$u.get('/sellerCarInApply/carDetailsOut', params), //获取出口申请车辆详情
		setPayPwd: (params = {}) => vm.$u.post('/seller/setPayPwd', params), //设置支付密码
		getCarFiles: (params = {}) => vm.$u.get('/carList/getOutCarById', params), //获取出口车辆手续详情
		getCarList: (params = {}) => vm.$u.get('/carList/searcByCarDetailsSeller', params), //获取供应商车辆列表
		getCarDetails: (params = {}) => vm.$u.get('/carList/getById', params), //获取供应商车辆详情
		changePhone: (params = {}) => vm.$u.get('/seller/modifyPhone', params), //更换手机号
		changePwd: (params = {}) => vm.$u.get('/seller/pwd/modify', params), //修改登录密码
		addBank: (params = {}) => vm.$u.post('/sellerBankList/insert', params), //新增银行配置
		getBankConfig: (params = {}) => vm.$u.get('/sellerBankList/page', params), //获取银行配置分页
		bankDelete: (params = {}) => vm.$u.post('/sellerBankList/delete?id=' + params), //供应商银行删除 
	};
};
export default {
	install,
};